//
//  KJTableViewSection.h
//  KJKit
//
//  Created by Tiger on 2022/6/9.
//

#import <Foundation/Foundation.h>
#import "KJTableViewItem.h"

NS_ASSUME_NONNULL_BEGIN

@interface KJTableViewSection : NSObject

@property (nonatomic, assign) CGFloat headerHeight;
@property (nonatomic, assign) CGFloat footerHeight;

@property (nonatomic, copy) NSString *footerTitle;
@property (nonatomic, copy) NSString *headerTitle;

@property (nonatomic, strong) UIView *footerView;
@property (nonatomic, strong) UIView *headerView;

@property (nonatomic, strong) NSMutableArray <__kindof KJTableViewItem *> *items;

+ (instancetype)section;

- (void)addItem:(__kindof KJTableViewItem *)item;
// 通过index插入
- (void)insertItem:(__kindof KJTableViewItem *)item withIndex:(NSUInteger)index;
- (void)addItems:(NSArray<__kindof KJTableViewItem *> *)items;
- (void)removeItem:(__kindof KJTableViewItem *)item;
- (void)removeAllItems;

@end

NS_ASSUME_NONNULL_END
